package com.github.caijh.mall.front.controller;


import java.util.List;
import javax.inject.Inject;

import com.github.caijh.framework.web.controller.BaseController;
import com.github.caijh.mall.system.service.SystemCityService;
import com.github.caijh.mall.system.vo.SystemCityTreeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("CityFrontController")
@RequestMapping("api/front/city")
@Api(tags = "城市控制器")
public class CityController extends BaseController {

    @Inject
    private SystemCityService systemCityService;

    /**
     * 城市服务树形结构数据
     *
     * @return {@code List<SystemCityTreeVo>}
     */
    @ApiOperation(value = "树形结构")
    @GetMapping(value = "/list")
    public List<SystemCityTreeVo> list() {
        return systemCityService.tree();
    }

}



